/**
 * 
 */
package com.ruanyun.tio.net.common.command;

import java.util.Objects;

/**
 * @author tanyaowu
 *
 */
public enum Command {
	//手机登录请求
    COMMAND_FRAME_MOBILE_LOGIN("0"),
	//手机心跳包
    COMMAND_FRAME_MOBILE_HEARTBEAT("1");

	public static Command from(int value) {
		Command[] values = Command.values();
		for (Command v : values) {
			if (Objects.equals(v.value, value)) {
				return v;
			}
		}
		return null;
	}

	String value;

	private Command(String value) {
		this.value = value;
	}

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
